#include "player.hpp"

Player::Player(unsigned int id,unsigned int x,unsigned int y,unsigned int score,string name):unique_id(id),name(name),x(x),y(y),score(score)
{
}

void Player::add_tresure(const Treasure & t)
{
    list_treasure.push_back(t);
    list_treasure.push_back(false);
}

bool Player::is_in_list(const Treasure & t)const
{
    for(auto & i:list_treasure)
    {
        if(i.type_treasure == t.type_treasure)
            return true;
    }

    return false;
}